import type { InjectionKey } from "vue";

export type NoticeType = "default" | "info" | "success" | "warning" | "error";

type NotificationFn = (
  message: string,
  option?: { title?: string; duration?: number },
) => void;

export const notificationInjectKey = Symbol() as InjectionKey<{
  info: NotificationFn;
  success: NotificationFn;
  warning: NotificationFn;
  error: NotificationFn;
}>;
